import React from 'react'
import {addDecorator,addParameters} from '@storybook/react'
import {withInfo} from "@storybook/addon-info"
import '../src/styles/index.scss'


const wrapperStyle:React.CSSProperties = {
    padding:'20px 40px'
}

const styleWrapper = (stroyFn:any) =>
    <div style={wrapperStyle}>
        <h3>组件演示</h3>
        {stroyFn()}
    </div>



// const styles:React.CSSProperties={
//     textAlign:'center',
// }
// const CenterDecorator =(storyFn:any)=><div style={styles}>{storyFn()}</div>

addDecorator(styleWrapper);
addDecorator(withInfo); 
addParameters({
    info:{
        inline:true,
        header:false,
    }
})